﻿<phone:PhoneApplicationPage
    x:Class="Eurocalculator.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
    shell:SystemTray.IsVisible="True" Background="{StaticResource PhoneAccentBrush}">

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12">
            <TextBlock x:Name="ApplicationTitle" Text="Eurocalculator" Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>
        <adduplex:AdControl xmlns:adduplex="clr-namespace:AdDuplex;assembly=AdDuplex.AdControl.Silverlight"
                       Grid.Row="1" 
                       AppId="2211" VerticalAlignment="Top" d:LayoutOverrides="Height, GridBox" 
                       />
        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentGrid" Grid.Row="1">

            <Button Content="1" Margin="10,268,0,275" Name="button_1" Click="keypad_Click" HorizontalAlignment="Left" Width="150" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneChromeColor}"/>
            	</Button.Background>
            </Button>
            <Button Content="2" Margin="160,268,170,275" Name="button_2" Click="keypad_Click" Width="150" d:LayoutOverrides="HorizontalAlignment" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneChromeColor}"/>
            	</Button.Background>
            </Button>
            <Button Content="3" Margin="0,264,20,275" Name="button_3" Click="keypad_Click" HorizontalAlignment="Right" Width="150" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneChromeColor}"/>
            	</Button.Background>
            </Button>
            <Button Content="4" Margin="10,358,0,185" Name="button_4" Click="keypad_Click" HorizontalAlignment="Left" Width="150" Height="90" d:LayoutOverrides="GridBox" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneChromeColor}"/>
            	</Button.Background>
            </Button>
            <Button Content="5" Margin="160,0,170,185" Name="button_5" Click="keypad_Click" Width="150" d:LayoutOverrides="HorizontalAlignment, GridBox" Height="90" VerticalAlignment="Bottom" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneChromeColor}"/>
            	</Button.Background>
            </Button>
            <Button Content="6" Margin="0,358,20,185" Name="button_6" Click="keypad_Click" HorizontalAlignment="Right" Width="150" Height="90" d:LayoutOverrides="GridBox" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneChromeColor}"/>
            	</Button.Background>
            </Button>
            <Button Content="7" Margin="10,452,0,91" Name="button_7" Click="keypad_Click" HorizontalAlignment="Left" Width="150" Height="90" d:LayoutOverrides="GridBox" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneChromeColor}"/>
            	</Button.Background>
            </Button>
            <Button Content="8" Margin="160,0,170,95" Name="button_8" Click="keypad_Click" Height="90" VerticalAlignment="Bottom" d:LayoutOverrides="GridBox" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneChromeColor}"/>
            	</Button.Background>
            </Button>
            <Button Content="9" Margin="0,448,20,95" Name="button_9" Click="keypad_Click" HorizontalAlignment="Right" Width="150" Height="90" RenderTransformOrigin="-0.705,0.511" d:LayoutOverrides="GridBox" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneChromeColor}"/>
            	</Button.Background>
            </Button>
            <Button Content="0" Margin="160,0,170,5" Name="button_0" Click="keypad_Click" Height="90" VerticalAlignment="Bottom" d:LayoutOverrides="GridBox" RenderTransformOrigin="0.497,1.278" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneChromeColor}"/>
            	</Button.Background>
            </Button>
            <TextBlock Margin="10,98,0,0" Name="EurDisplay" Text="0.00" FontStretch="Normal" FontSize="56" TextAlignment="Right" HorizontalAlignment="Left" Width="289" Height="81" VerticalAlignment="Top" />
            <Button Content="." Margin="10,0,0,5" Name="buttonDot" Click="buttonDot_Click" HorizontalAlignment="Left" Width="150" Height="90" d:LayoutOverrides="Height, GridBox" VerticalAlignment="Bottom" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneChromeColor}"/>
            	</Button.Background>
            </Button>
            <Button Content="CE" Margin="0,0,20,5" Name="ce" Click="buttonCe_Click" Height="90" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="150" d:LayoutOverrides="GridBox" >
            	<Button.Background>
            		<SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
            	</Button.Background>
            </Button>
            <TextBlock Height="81" HorizontalAlignment="Right" Margin="0,98,20,0" Name="EekIcon" Text="EEK" VerticalAlignment="Top" Width="110" FontSize="56" TextAlignment="Left" Foreground="{Binding Source={StaticResource PhoneContrastBackgroundBrush}}" />
            <TextBlock HorizontalAlignment="Right" Margin="0,179,20,0" Name="EurIcon" Text="EUR" Width="109" FontSize="56" TextAlignment="Left" Foreground="{Binding Source={StaticResource PhoneAccentBrush}}" Height="81" VerticalAlignment="Top" />
            <TextBlock Height="81" HorizontalAlignment="Left" Margin="22,179,0,0" Name="EekDisplay" Text="0.00" VerticalAlignment="Top" Width="277" FontSize="56" TextAlignment="Right" />
        </Grid>
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" BackgroundColor="{StaticResource PhoneAccentColor}">
                <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="Convert EUR / EEK" Click="convert_Click" />
                <shell:ApplicationBarMenuItem Text="About" Click="about_Click" />
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>
